package com.fan.txl.mock.api.annotation;

import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by jiajiabao on 17-1-13.
 */

public class ConstFieldParse {


    private Map<String,String> parseAnnotation(Annotation annotation) {
        Map<String,String> constFields = new HashMap<>();
     if(annotation instanceof ConstField){
         ConstField constField = ((ConstField) annotation);
            String[] values = constField.values();
            String[] keys = constField.keys();
            for (int i = 0; i < keys.length; i++) {
                constFields.put(keys[i], values[i]);
            }
        }
        return constFields;
    }
}
